package com.will.txj.common.security;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author wen-yi
 * @since 2021-11-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("aj_sys_perm")
@ApiModel(value="SysPerm对象", description="")
public class SysPerm extends Model<SysPerm> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer pId;

    private String menuName;

    private String routerUrl;

    @ApiModelProperty(value = "权限标识")
    private String permTag;

    private String icon;

    @ApiModelProperty(value = "类型 0菜单  1API")
    private Integer type;

    @ApiModelProperty(value = "0不展开 1展开")
    private Integer open;

    private Integer menuSort;

    private String des;

    @ApiModelProperty(value = "0:不可用 1:可用")
    private Integer dis;

    private Integer cId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date cT;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date uT;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
